<?php

namespace Apps\AppApi\Method\Note;

use Apps\AppApi\Method\BaseMethod;
use PhalconPlus\Api\Common\ResultStatus;
use Apps\Common\Models\Members;


/**
 * 记事本会员分类列表
 * @author      545
 * @date        2016年3月4日
 * @version     1.1.2
 * @copyright   Copyright 2015 meelier.com
 */
class MemberList extends BaseMethod
{
    
    private $success = 0;
    private $id = 0;

    public function run()
    {
        //验证是否登录
        if(false == $this->verifyUserAuth()){
            return false;
        }
//         $page = intval($this->getDataItem('page',1));
        
//         $limit = $this->getConfig()->limit;
//         $offset = ($page-1)*$limit;
        
        $userid = $this->getUserAuth()->userId;
    	
    	$data = Members::query()
        ->columns(['member_id', 'member_name','member_tel','remark'])
        ->where('user_id = :uid:')
        ->bind(['uid'=>$userid])
        ->orderBy('member_id DESC')
//         ->limit($limit,$offset)
        ->execute()
        ->toArray();
        
        $this->setResult($data);
        
    }

}